package com.example.april.service.impl;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.conditions.query.QueryChainWrapper;
import com.example.april.dao.UserDao;
import com.example.april.pojo.User;
import com.example.april.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class UserServiceImpl implements UserService {

    @Autowired
    UserDao userDao;

    @Override
    public User find(User user) {
        User u = userDao.selectOne(new QueryWrapper<User>().eq("phone",user.getPhone()));
        return u;
    }
}
